package com.nuanshui.heatedloan.web;

import com.nuanshui.heatedloan.dal.IdTypeHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zxh on 2017/7/3.
 */
@RestController
@RequestMapping("/cms/manage/tool")
public class ToolController extends ApiController {

    @RequestMapping("/encode")
    public String encode(long id){
        return success(IdTypeHandler.encode(id));
    }

    @RequestMapping("/decode")
    public String decode(String s){
        return success(IdTypeHandler.decode(s));
    }
}
